/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package org.malva.dbpop;

/**
 *
 * @author vramirez
 */
public class AutoNum extends AbstractDBPopType{
    private Integer init;
    private Integer inc;
    private Integer value;

    public AutoNum(Integer init, Integer inc) {
        this.init = init;
        this.inc = inc;
        this.value=init;
    }

    public AutoNum(Integer init) {
        this(init,1);
    }

    public AutoNum() {
        this(1);
    }

    public String next(){
        Integer ret=value;
        value=value+inc;
        return ret.toString();
    }


}
